<template>
    <div class="iframe">
        <div class="i-title">
            <h3>父与子传参</h3>
        </div>
        <div class="i-tip">
            显示输出值：{{info.name}},{{info.msg}},{{info.say}}
        </div>
        <slot></slot>
        <div class="i-tip">
            <el-button @click="giveValue">传参</el-button>
        </div>
    </div>
</template>

<script setup>
import { reactive } from "vue"

const props = defineProps([
    "msg",
    "say"
])
const emits = defineEmits(["giveF"])
let info = reactive({
    name: "tgrong",
    msg: props.msg,
    say: props.say
})
function giveValue() {
    emits("giveF", "程序是一个好职业")
}     
</script>

